<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>控制动画运行或暂停</title>
    <style media="screen">
        div{
            width: 50px;
            height: 50px;
            background-color: green;
            -webkit-animation:mybox 2s linear 2;/*属性统一写一处*/
        }
        @-webkit-keyframes mybox{
            100%{transform: rotate(360deg);}
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>
